package sma.iss;

/**
 * 
 * @author smarsoll
 * 
 */
public class IssUtil {

	public static final double BETA_DEFAULT = 75;

	// /** (Hard) The maximum absolute value of SARJ velocity = 0.15 degrees/second */
	// public static final double MAX_SARJ_VEL = 0.15;
	//
	// /** (Hard)The maximum absolute value of SARJ acceleration = 0.005 degrees/second^2*/
	// public static final double MAX_SARJ_ACC = 0.005;
	//
	// /** (Hard)The maximum absolute value of BGA velocity = 0.25 degrees/second */
	// public static final double MAX_BGA_VEL = 0.25;
	//
	// /** (Hard)The maximum absolute value of BGA acceleration = 0.01 degrees/second^2 */
	// public static final double MAX_BGA_ACC = 0.01;


	/**
	 * Calculate apha angle
	 * 
	 * @param minute
	 *            can be negative, modulo 92 is done.
	 * @return alpha angle
	 */
	public static final double alphaForMinute(int minute) {
		return (360.0 / 92.0) * (minute % 92);
	}

	/**
	 * 
	 * @param state
	 *            20 values
	 * @param inputToFill
	 *            4 + 10 values to be filled
	 */
	public static void fillState(double[] state, double[] inputToFill) {
		for (int i = 0; i < 10; i++) {
			// in state array you have the speed after the angle
			inputToFill[4 + i] = state[2 * i];
		}

	}

}
